import 'package:flutter/material.dart';
import 'package:flutter_09_game/base/widget/base_get_builder.dart';
import 'package:flutter_09_game/config/app_color.dart';
import 'package:flutter_09_game/generated/assets.dart';
import 'package:flutter_09_game/generated/locales.g.dart';
import 'package:flutter_09_game/user/app_user_manager.dart';
import 'package:flutter_09_game/widgets/appbar/common_app_bar.dart';
import 'package:flutter_09_game/widgets/image/auto_image.dart';
import 'package:flutter_09_game/widgets/tab/common_tab_bar_page.dart';
import 'package:flutter_09_game/widgets/tab/custom_tab_indicator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import 'deposit_record_logic.dart';

class DepositRecordPage extends StatelessWidget {
  DepositRecordPage({super.key});

  final DepositRecordLogic logic = Get.put(DepositRecordLogic());

  @override
  Widget build(BuildContext context) {
    return BaseGetBuilder<DepositRecordLogic>(
        appBar: CommonAppBar(
          title: LocaleKeys.transactionDetails.tr,
          // showBack: false,
          actions: [
            GestureDetector(
              onTap: () {
                AppUserManager().showServiceSheet();
              },
              child: AutoImage(
                Assets.commonServiceBtn,
                width: 32.w,
              ),
            ),
            10.horizontalSpace,
          ],
        ),
        builder: (_) {
          return CommonTabBarPage(
              tabIsScrollable: false,
              tabBarPadding: EdgeInsets.zero,
              labelPadding: EdgeInsets.zero,
              tabController: logic.tabController,
              indicatorSize: TabBarIndicatorSize.tab,
              backgroundColor: AppColor.navBgColor,
              // fitTabBackgroundColor: Colors.red,
              tabBarHeight: 50.w,
              // keepView: false,
              // tabBarPadding: ,
              indicator: CustomTabIndicator(
                width: 76.w,
                height: 2.w,
                indicatorPadding: EdgeInsets.only(top: -4.w),
                color: AppColor.primary,
                // borderRadius: 2.w,
                isCentered: true,
              ),
              tabData: logic.tabs);
        });
  }
}
